﻿// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "StarrySkyDamageGameplayAbility.h"
#include "AbilitySystem/Abilities/StarrySkyGameplayAbility.h"
#include "StarrySkyProjectileSpell.generated.h"

class AStarrySkyProjectile;
/**
 * 
 */
UCLASS()
class STARRYSKY_API UStarrySkyProjectileSpell : public UStarrySkyDamageGameplayAbility
{
	GENERATED_BODY()
protected:
	//重写能力激活方法
	virtual void ActivateAbility(const FGameplayAbilitySpecHandle Handle, const FGameplayAbilityActorInfo* ActorInfo, const FGameplayAbilityActivationInfo ActivationInfo, const FGameplayEventData* TriggerEventData) override;

	//释放抛射物的方法
	UFUNCTION(BlueprintCallable, Category="Projectile Spell")
	void SpawnProjectile(const FVector& ProjectileTargetLocation,const FGameplayTag& SocketTag,bool bOverridePitch=false,float PitchOverride=0.f);
	
	
	//保存抛射物子类
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Projectile Spell")
	TSubclassOf<AStarrySkyProjectile> ProjectileClass;
};
